<?php
namespace app\admin\controller;

use think\Controller;
use think\Db;
use think\Log;
use think\Request;

class Index extends Common
{
    public function index()
    {
        if(Request()->isPost()){
            $input = Request()->post();

            Db::name('index')->where(' 1 = 1 ')->update($input);
            adminReturn(1, '保存成功');
        }else{
            $info = Db::name('index')->find();
            $this->assign('info', $info);

            $this->assign('title', '网站首页');
            return $this->fetch();
        }
    }


}
